package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:32 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductVersionScopeRelateBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductVersionScopeRelate productVersionScopeRelate;

  protected BeanMap getBeanMap() {

    return new BeanMap(productVersionScopeRelate);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductVersionScopeRelateDAO.Id);

    mappedDaoFields.put(
        "versionScopeId",
        com.ourteam.product.requirement.dao.IProductVersionScopeRelateDAO.VersionScopeId);

    mappedDaoFields.put(
        "relateType", com.ourteam.product.requirement.dao.IProductVersionScopeRelateDAO.RelateType);

    mappedDaoFields.put(
        "relatedObjectId",
        com.ourteam.product.requirement.dao.IProductVersionScopeRelateDAO.RelatedObjectId);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductVersionScopeRelateDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductVersionScopeRelateDAO.Remarks);

    mappedDaoFields.put(
        "scopeName", com.ourteam.product.requirement.dao.IProductVersionScopeRelateDAO.ScopeName);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductVersionScopeRelateBean() {
    super();

    this.productVersionScopeRelate =
        new com.ourteam.product.requirement.dao.ProductVersionScopeRelate();
  }

  public ProductVersionScopeRelateBean(
      com.ourteam.product.requirement.dao.ProductVersionScopeRelate productVersionScopeRelate) {
    super();

    this.productVersionScopeRelate = productVersionScopeRelate;
  }

  public com.ourteam.product.requirement.dao.ProductVersionScopeRelate
      convertToProductVersionScopeRelate() {
    return this.productVersionScopeRelate;
  }

  public com.ourteam.product.requirement.dao.ProductVersionScopeRelate convertTo() {
    return this.productVersionScopeRelate;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productVersionScopeRelate.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productVersionScopeRelate.setId(id);
  }

  /**
   * Get versionScopeId
   *
   * @return long
   */
  public long getVersionScopeId() {
    return (long) this.productVersionScopeRelate.getVersionScopeId();
  }

  /**
   * Set versionScopeId
   *
   * @parameter long
   */
  public void setVersionScopeId(long versionScopeId) {

    this.productVersionScopeRelate.setVersionScopeId(versionScopeId);
  }

  /**
   * Get relateType
   *
   * @return String
   */
  public String getRelateType() {
    return (String) this.productVersionScopeRelate.getRelateType();
  }

  /**
   * Set relateType
   *
   * @parameter String
   */
  public void setRelateType(String relateType) {

    this.productVersionScopeRelate.setRelateType(relateType);
  }

  /**
   * Get relatedObjectId
   *
   * @return long
   */
  public long getRelatedObjectId() {
    return (long) this.productVersionScopeRelate.getRelatedObjectId();
  }

  /**
   * Set relatedObjectId
   *
   * @parameter long
   */
  public void setRelatedObjectId(long relatedObjectId) {

    this.productVersionScopeRelate.setRelatedObjectId(relatedObjectId);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productVersionScopeRelate.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productVersionScopeRelate.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productVersionScopeRelate.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productVersionScopeRelate.setRemarks(remarks);
  }

  /**
   * Get scopeName
   *
   * @return String
   */
  public String getScopeName() {

    return (String) this.productVersionScopeRelate.getScopeName();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductVersionScopeRelateBean) == false) {
      return false;
    } // end if

    ProductVersionScopeRelateBean other = (ProductVersionScopeRelateBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductVersionScopeRelate tempProductVersionScopeRelate =
        other.convertToProductVersionScopeRelate();

    if (tempProductVersionScopeRelate == null || this.productVersionScopeRelate == null) {
      isEqual = false;
    } else if (tempProductVersionScopeRelate == this.productVersionScopeRelate
        || tempProductVersionScopeRelate.equals(this.productVersionScopeRelate)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductVersionScopeRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionScopeRelate[] aProductVersionScopeRelates) {

    return toArray(aProductVersionScopeRelates, null);
  }

  public static ProductVersionScopeRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionScopeRelate[] aProductVersionScopeRelates,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductVersionScopeRelates)) {
      return new ProductVersionScopeRelateBean[0];
    }

    int length = aProductVersionScopeRelates.length;

    ProductVersionScopeRelateBean[] beans = new ProductVersionScopeRelateBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductVersionScopeRelateBean(aProductVersionScopeRelates[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductVersionScopeRelates[i]});
      }
    }

    return beans;
  }
}
